package com.chinasofti.io;

import java.io.File;

public class Demo05 {
    public static void main(String[] args) {
        File f1 = new File("java0418\\java.txt");
        System.out.println(f1.isDirectory());
        System.out.println(f1.isFile());
        System.out.println(f1.exists());
        System.out.println("=========");
        System.out.println(f1.getAbsoluteFile());
        System.out.println(f1.getPath());
        System.out.println(f1.getName());
        System.out.println("==============");
        File f2 = new File("java0418\\changxin");
        File [] fileArray = f2.listFiles();
        for (File file:fileArray){
            System.out.println("file = " + file);
            System.out.println(file.getName());
        }
    }
}
